<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>获取ul里某个li</title>
</head>
<body>
<ul>
    <li>小</li>
    <li>时</li>
    <li>代</li>
</ul>
<script>
    console.log(document.getElementsByTagName("ul")[0].getElementsByTagName("li")[1].innerHTML);
</script>
</body>
</html>